<!--
* @author dumeng
课件列表
-->
<template>
  <div class="courseware-container">
    <el-collapse-transition>
      <div v-show="searchshow" class="courseware-search merge">
        <span class="svg-container">
          <svg-icon icon-class="search" />
        </span>
        <el-input
          v-model="listQuery.subjectName"
          placeholder="请输入课件名称搜索"
          class="search-input"
          @keyup.enter.native="handleFilter"
        />
        <div class="courseware-search-btn">
          <el-button class="filter-item" type="primary" @click="handleFilter">搜索</el-button>
          <el-button class="filter-item" type="primary" @click="resettingBtn">重置</el-button>
          <span class="courseware-search-more" @click="searchshow = !searchshow">
            更多筛选条件
            <i class="el-icon-arrow-down" />
          </span>
        </div>
      </div>
    </el-collapse-transition>
    <el-collapse-transition>
      <div v-show="!searchshow" class="courseware-search separate">
        <div class="courseware-search-inner">
          <el-row>
            <el-col :span="8">
              <div class="search-inner-item">
                <div class="item-label">课件名称</div>
                <el-input
                  v-model.trim="search.subjectName"
                  style="width: 80%;"
                  class="filter-item"
                  placeholder="请输入课件名称搜索"
                />
              </div>
            </el-col>
            <el-col :span="8">
              <div class="search-inner-item">
                <div class="item-label">课件分类</div>
                <el-cascader
                  ref="classify"
                  v-model="search.subjectClassify"
                  style="width:80%"
                  clearable
                  :props="classifyProps"
                  :options="classifyOptions"
                />
              </div>
            </el-col>
            <el-col :span="8">
              <div class="search-inner-item">
                <div class="item-label">课件类型</div>
                <el-radio-group v-model="search.subjectType" style="width: 80%;margin-top: 20px;">
                  <el-radio label="">全部</el-radio>
                  <el-radio label="KCLX01">视频</el-radio>
                  <el-radio label="KCLX03">音频</el-radio>
                  <el-radio label="KCLX02">pdf文档</el-radio>
                </el-radio-group>
              </div>
            </el-col>
          </el-row>
          <el-row>
            <!-- <el-col :span="8">
              <div class="search-inner-item">
                <div class="item-label">关键词</div>
                <el-input
                  v-model.trim="search.subjectKeyword"
                  style="width: 80%;"
                  class="filter-item"
                  placeholder="请输入关键词搜索"
                />
              </div>
            </el-col> -->
          </el-row>
        </div>
        <div class="courseware-search-btn">
          <el-button type="primary" @click="handleFilter">搜索</el-button>
          <el-button class="filter-item" type="primary" @click="resettingBtn">重置</el-button>
          <span class="courseware-search-more" @click="searchshow = !searchshow">
            精简筛选条件
            <i class="el-icon-arrow-up" />
          </span>
        </div>
      </div>
    </el-collapse-transition>
    <div v-if="!isSelect" class="courseware-btn">
      <div class="btn-title">
        <span>课件管理</span>
      </div>
      <div class="btn-btns">
        <el-button
          style="margin-left: 10px;"
          @click="coursewareInfo = {}, isCreate = true"
        >新建课件
        </el-button>
        <el-button
          v-if="activeTab==='2'"
          style="margin-left: 10px;"
          @click="handleSelectDelet"
        >批量删除
        </el-button>
        <el-button
          v-if="activeTab==='2'"
          style="margin-left: 10px;"
          @click="handleSelectSend"
        >批量发布
        </el-button>
      </div>
    </div>
    <div v-if="!isSelect" class="classify-tab">
      <el-tabs v-model="activeTab" @tab-click="handleTabClick">
        <el-tab-pane v-for="item in statusOptions" :key="item.id" :label="item.statusName" :name="item.id" />
      </el-tabs>
    </div>
    <div class="courseware-list">
      <v-table :list="courseList" :tag="activeTab === '3' ? 'coursewareManagementRelease':'coursewareManagement'" :list-loading="listLoading" :filter-column="filtercolumn" :source-arr="sourceArr" @handleSelectionChange="handleSelectionChange">
        <el-table-column
          prop="transcodeStatusValue"
          label="转码状态"
        >
          <template slot-scope="scope">
            <el-tooltip class="item" effect="dark" :content="scope.row.transcodeFailReason?scope.row.transcodeFailReason:scope.row.transcodeStatusValue" placement="top-start">
              <span v-if="scope.row.transcodeStatus==='4'" style="color: red;"> {{ scope.row.transcodeStatusValue }}</span>
              <span v-else>{{ scope.row.transcodeStatusValue }}</span>
            </el-tooltip>
          </template>
        </el-table-column>
        <el-table-column
          v-if="!isSelect"
          fixed="right"
          label="操作"
          width="130"
        >
          <template slot-scope="scope">
            <el-button type="text" size="small" @click="handleSee(scope.row)">查看</el-button>
            <template v-if="scope.row.transcodeStatus === '3'">
              <el-button type="text" size="small" @click="handleUpdate(scope.row)">编辑</el-button>
              <el-button type="text" size="mini" @click="handlePublish(scope.row)">
                {{ scope.row.status === 'KCZT02' ? '发布' : '取消发布' }}
              </el-button>
              <el-button v-if="scope.row.status === 'KCZT01'" type="text" size="small" @click="handleCourse(scope.row)">创建课程</el-button>
              <el-button type="text" size="small" @click="handleExercises(scope.row)">练习题</el-button>
            </template>
            <el-button v-if="scope.row.status!=='KCZT01' && scope.row.transcodeStatus !== '2'" type="text" size="small" @click="handleDel(scope.row)">删除</el-button>
            <el-button v-if="scope.row.transcodeStatus === '2'" type="text" size="small" @click="refresh(scope.$index,scope.row)">刷新</el-button>
            <el-button v-if="scope.row.transcodeStatus === '4'" type="text" size="small" @click="handleAgain(scope.row)">重新转码</el-button>
          </template>
        </el-table-column>
      </v-table>
    </div>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="listQuery.page"
      :limit.sync="listQuery.limit"
      @pagination="getList"
    />
    <!--    -->
    <el-dialog
      v-if="preview.state"
      v-el-drag-dialog
      :visible.sync="preview.state"
      :close-on-click-modal="false"
      :fullscreen="isFull"
      title="预览"
      center
      width="600px"
      @close="preview.stat=false"
    >
      <span slot="title" class="my-title">
        <span>预览</span>
        <div v-if="preview.fileType==='KCLX02'" class="full">
          <el-button size="small" type="primary" icon="el-icon-full-screen" @click="isFull=!isFull">{{ isFull? '取消全屏':'全屏' }}</el-button>
        </div>
      </span>
      <courseware-preview v-if="preview.state" :is-full="isFull" :type="preview.fileType" :show-type="preview.showType" :file-id="preview.fileId" style="width:100%;height:100%;" />
    </el-dialog>
    <create-courseware v-if="isCreate" :info="coursewareInfo" @close="closeFun" />
    <el-dialog v-el-drag-dialog :close-on-click-modal="false" :destroy-on-close="true" :visible.sync="visibleState" title="查看" center width="800px">
      <el-row class="see-dialog">
        <el-col :span="12">
          <div class="box">
            <div class="key">课件封面：</div>
            <div class="value"> <el-image
              style="width: 100px; height:auto;display: inline-block;vertical-align: top;"
              :src="isOss?coursewareInfo.subjectImgUrl:view+coursewareInfo.subjectImg"
              :preview-src-list="[isOss?coursewareInfo.subjectImgUrl:view+coursewareInfo.subjectImg]"
            >
              <div slot="error" class="image-slot" style="width: 100%; height: 67px;background-color: #f8f8f8;display: flex;align-items: center;justify-content: center;">
                未上传
              </div>
            </el-image>
            </div>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="box">
            <div class="key min">课件：</div>
            <div class="value">
              <!-- 如果是转码中，只有查看-->
              <el-button v-if="coursewareInfo.subjectType!='KCLX02' || coursewareInfo.transcodeStatus === '2' " size="small" type="primary" icon="el-icon-view" @click="handlePreview(coursewareInfo,'before')">
                {{ coursewareInfo.transcodeStatus === '2'?'查看':'原始文件' }}</el-button>
              <el-button v-if="coursewareInfo.transcodeStatus !== '2' && coursewareInfo.transcodeStatus !== '4'" size="small" type="primary" icon="el-icon-view" @click="handlePreview(coursewareInfo,'after')">{{ coursewareInfo.subjectType!='KCLX02'?'转码后':'查看' }}</el-button>
            </div>
          </div>
        </el-col>
        <el-col :span="24">
          <div class="box">
            <div class="key">课件名称：</div>
            <div class="value">{{ coursewareInfo.subjectName+'' }}</div>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="box">
            <div class="key">课件分类：</div>
            <div class="value"> {{ coursewareInfo.subjectClassifyIdsValue || '' }}</div>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="box">
            <div class="key">课件类型：</div>
            <div class="value"> {{ coursewareInfo.subjectTypeValue || '' }}</div>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="box">
            <div class="key">{{ coursewareInfo.subjectType!='KCLX02'?'课件时长':'PDF页数' }}：</div>
            <div class="value">{{ fomatterTimeAndPage(coursewareInfo.subjectType,coursewareInfo.subjectDuration) || '' }}</div>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="box">
            <div class="key"> 课件来源：</div>
            <div class="value"> {{ coursewareInfo.subjectSource || '' }}</div>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="box">
            <div class="key max">课件转码状态：</div>
            <div class="value">{{ coursewareInfo.transcodeStatusValue }}</div>
          </div>
        </el-col>
        <el-col :span="12">
          <div class="box">
            <div class="key max">课件发布状态：</div>
            <div class="value">{{ coursewareInfo.statusValue }}</div>
          </div>
        </el-col>
        <el-col :span="24">
          <div class="box">
            <div class="key"> 关键词：</div>
            <div class="value">{{ coursewareInfo.subjectKeyword || '' }}</div>
          </div>
        </el-col>
        <el-col :span="24">
          <div class="box">
            <div class="key min"> 标签：</div>
            <div class="value">
              {{ coursewareInfo.subjectLabel||'' }}
            </div>
          </div>
        </el-col>
        <el-col :span="24" style="white-space: pre-line;">
          <div class="box">
            <div class="key">简介：</div>
            <div v-if="coursewareInfo.subjectIntroduce" class="value textarea-view"> {{ coursewareInfo.subjectIntroduce }}</div>
          </div>
        </el-col>

      </el-row>
      <section slot="footer" class="dialog-footer">
        <el-button style="padding: 10px 30px;" @click="visibleState = false">关 闭</el-button>
      </section>
    </el-dialog>
  </div>
</template>
<script>
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import { deleteSubject, fetchList, getClassifyTree, update, get, batchPublish, batchDelet } from '../api/courseware'
import { mapGetters } from 'vuex'
import elDragDialog from '@/directive/el-drag-dialog' // base on element-ui
import CoursewarePreview from '../components/CoursewarePreview'
import CreateCourseware from '../components/createCourseware'
import vTable from '@/components/Table'
export default {
  name: 'Courseware',
  components: { Pagination, CoursewarePreview, CreateCourseware, vTable },
  directives: { elDragDialog },
  props: {
    isSelect: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      isFull: false, // 是否全屏
      listLoading: false,
      list: null,
      total: 0,
      searchshow: true,
      search: {
        subjectName: '',
        subjectClassify: '',
        subjectKeyword: '',
        subjectSource: '',
        subjectType: ''
      },
      classifyProps: {
        label: 'classifyName',
        value: 'id',
        checkStrictly: true
      },
      classifyOptions: [],
      statusOptions: [
        {
          statusName: '全部',
          id: '1'
        },
        {
          statusName: '转码成功/未发布',
          id: '2'
        },
        {
          statusName: '已发布',
          id: '3'
        },
        {
          statusName: '转码中',
          id: '4'
        },
        {
          statusName: '转码失败',
          id: '5'
        }
      ],
      activeTab: '1',
      listQuery: {
        page: 1,
        limit: 10,
        subjectName: ''
      },
      checkList: [],
      courseList: [],
      view: '/API-DOCUMENT/document/file/download?id=',
      dict: {
        KCLX: [] // 课件类型
      },
      preview: {
        fileId: '',
        fileType: '',
        showType: '',
        state: false
      },
      coursewareInfo: {},
      visibleState: false,
      multipleSelection: [],
      isCreate: false,
      isOss: sessionStorage.getItem('FILE_SAVE_THIRD_CONFIG') || false,
      sourceArr: ['subjectImgUrl'],
      isCreatePage: true
    }
  },
  computed: {
    ...mapGetters([
      'sidebar'
    ])
  },
  created() {
    this.activeTab = this.$route.query.active || '1'
    this.getClassifyOption()
    this.getList()
  },
  // activated() {
  //   if (this.isCreatePage) { this.listQuery.page = 1 }
  //   this.getList()
  // },
  methods: {
    refresh(index, row) {
      this.getData(row.id).then((res) => {
        if (res !== 0) {
          this.$set(this.courseList, index, res)
        }
      })
    },
    getData(id) {
      const loading = this.$loading({
        lock: true,
        text: '请稍后',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.3)'
      })
      return new Promise((resolve, reject) => {
        get({ id: id }).then(res => {
          loading.close()
          resolve(res.data.data)
        }).catch((e) => {
          loading.close()
          resolve(0)
        })
      })
    },
    /**
     * 格式化课件时长单位
     */
    fomatterTimeAndPage(type, t) {
      if (type === 'KCLX02') {
        return t + '页'
      } else {
        const fTime = t || 0
        let time = parseInt(fTime) + '秒'
        if (parseInt(fTime) > 60) {
          var second = parseInt(fTime) % 60
          var min = parseInt(fTime / 60)
          time = min + '分' + second + '秒'

          if (min > 60) {
            min = parseInt(fTime / 60) % 60
            var hour = parseInt(parseInt(fTime / 60) / 60)
            time = hour + '小时' + min + '分' + second + '秒'

            if (hour > 24) {
              hour = parseInt(parseInt(fTime / 60) / 60) % 24
              var day = parseInt(parseInt(parseInt(fTime / 60) / 60) / 24)
              time = day + '天' + hour + '小时' + min + '分' + second + '秒'
            }
          }
        }
        return time
      }
    },
    /**
     * 转换成数组
     */
    getArr(str) {
      try {
        return str.split(',')
      } catch (e) {
        return []
      }
    },
    /**
     * 创建课程
     */
    handleCourse(item) {
      this.isCreatePage = false
      this.$router.push({ path: this.$filterPath('create'), query: { i: item.id, t: 'courseware', active: this.activeTab }})
    },
    closeFun() {
      this.isCreate = false
      this.getList()
    },
    /**
     * 选项卡切换
     */
    handleTabClick(tab, event) {
      this.listQuery.page = 1
      this.getList()
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
      this.$emit('handleSelect', this.multipleSelection)
    },
    /**
     * 预览
     * i: 课件信息
     */
    handlePreview(i, t) {
      this.preview.fileId = t === 'before' ? i.courseId : i.courseIdUrl
      this.preview.fileType = i.subjectType
      this.preview.showType = t
      this.preview.state = true
    },
    /**
     * 查看
     * i: 课件信息
     */
    handleSee(i) {
      this.coursewareInfo = i
      this.visibleState = true
    },
    /**
     * 重新转码
     * i: 课件信息
     */
    handleAgain(i) {
      this.coursewareInfo = i
      this.isCreate = true
    },
    /**
     * 练习题
     */
    handleExercises(item) {
      this.$router.push({ path: this.$filterPath('exercises'), query: { ci: item.id, active: this.activeTab }})
    },
    /**
     * 启用/禁用
     */
    handlePublish(row) {
      const state = row.status === 'KCZT01' ? 'KCZT02' : 'KCZT01'
      let msg = ''
      if (row.status === 'KCZT01') {
        msg = '取消发布'
      } else {
        msg = '发布'
      }
      this.$confirm('确定' + msg + '该课件吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        const loading = this.$loading({
          lock: true,
          text: '请稍后',
          spinner: 'el-icon-loading',
          background: 'rgba(0, 0, 0, 0.3)'
        })
        return new Promise((resolve, reject) => {
          update({ id: row.id, status: state }).then(() => {
            loading.close()
            this.$message({
              title: '成功',
              message: '操作成功',
              type: 'success',
              duration: 2000
            })
            this.getList()
          }).catch(error => {
            loading.close()
            reject(error)
          })
        })
      }).catch(() => {
      })
    },
    /**
     * 获取课件分类
     */
    getClassifyOption() {
      return new Promise((resolve, reject) => {
        getClassifyTree({ classifyType: 'JNZQFL01' }).then(({ data }) => {
          this.classifyOptions = data.data || []
        }).catch(error => {
          reject(error)
        })
      })
    },
    getList(obj) {
      this.listLoading = true

      var query = {
        page: obj ? obj.page : this.listQuery.page,
        pageSize: obj ? obj.limit : this.listQuery.limit,
        type: this.isSelect ? '3' : this.activeTab
      }
      if (this.searchshow) {
        query['subjectName'] = this.listQuery.subjectName
      } else {
        query['subjectName'] = this.search.subjectName
        query['subjectClassify'] = this.search.subjectClassify.length > 0 ? this.search.subjectClassify[this.search.subjectClassify.length - 1] : ''
        query['subjectKeyword'] = this.search.subjectKeyword
        query['subjectSource'] = this.search.subjectSource
        query['subjectType'] = this.search.subjectType
      }
      return new Promise((resolve, reject) => {
        fetchList(query).then(response => {
          this.courseList = response.data.data.rows
          this.total = response.data.data.total
          this.listLoading = false
        }).catch(error => {
          this.listLoading = false
          reject(error)
        })
      })
    },
    handleFilter() {
      this.listQuery.page = 1
      this.getList()
    },
    resettingBtn() {
      this.listQuery.subjectName = ''
      for (const i in this.search) {
        this.search['' + i + ''] = ''
      }
      this.listQuery.page = 1
      this.getList()
    },
    handleUpdate(item) {
      this.isCreatePage = false
      this.$router.push({ path: this.$filterPath('coursewareManage'), query: { i: item.id, type: 'u', active: this.activeTab }})
    },
    handleDeletes() {
      const arr = []
      if (this.checkList.length > 0) {
        this.checkList.forEach(item => {
          arr.push(item)
        })
        var ids = arr.join(',')
        this.deleteSubject(ids)
      } else {
        this.$message({
          message: '请选择需要删除的数据！',
          type: 'error'
        })
      }
    },
    handleDel(row) {
      if (row.status === 'KCZT01') {
        this.$message({
          message: '课件已发布，无法删除',
          type: 'warning'
        })
      } else {
        this.deleteSubject(row.id)
      }
    },
    deleteSubject(ids) {
      this.$confirm('此操作将永久删除该课件, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        const loading = this.$loading({
          lock: true,
          text: '请稍后',
          spinner: 'el-icon-loading',
          background: 'rgba(0, 0, 0, 0.3)'
        })
        return new Promise((resolve, reject) => {
          deleteSubject({ id: ids }).then(() => {
            loading.close()
            this.$message({
              title: '成功',
              message: '删除成功',
              type: 'success',
              duration: 2000
            })
            this.getList()
          }).catch(error => {
            loading.close()
            reject(error)
          })
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        })
      })
    },
    filtercolumn(scope, item) {
      return scope.row[item]
    },
    handleSelectDelet() {
      if (this.multipleSelection.length > 0) {
        this.$confirm('此操作将永久删除选中课件, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          const loading = this.$loading({
            lock: true,
            text: '请稍后',
            spinner: 'el-icon-loading',
            background: 'rgba(0, 0, 0, 0.3)'
          })
          const params = {
            ids: this.multipleSelection.map(i => i.id).join(',')
          }
          batchDelet(params).then(res => {
            loading.close()
            this.getList()
          }).catch(err => loading.close(err))
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })
      } else {
        this.$message(
          {
            type: 'warning',
            message: '请选择需要删除的课件'
          }
        )
      }
    },
    handleSelectSend() {
      if (this.multipleSelection.length > 0) {
        const loading = this.$loading({
          lock: true,
          text: '请稍后',
          spinner: 'el-icon-loading',
          background: 'rgba(0, 0, 0, 0.3)'
        })
        const params = {
          id: this.multipleSelection.map(i => i.id).join(','),
          status: 'KCZT01'
        }
        batchPublish(
          params
        ).then(res => {
          loading.close()
          this.getList()
        }).catch(err => loading.close(err))
      } else {
        this.$message(
          {
            type: 'warning',
            message: '请选择需要发布的课件'
          }
        )
      }
    }
  }

}
</script>
<style rel="stylesheet/scss" lang="scss">
$dark_gray: #bfced6;
.courseware-container {
  padding: 20px;
  .el-button+.el-button{
    margin-left: 0 !important;
  }
  .my-title{
   width: 100%;
   display:inline-block;
    font-size: 16px !important;
    font-family: PingFangSC-Medium !important;
    font-weight: 700 !important;
    color: #333333 !important;
      position: relative;
    .full{
      position: absolute;
      width: 100px;
      height: 58px;
      right: 50px;
      top: -18px;
      display: flex;
      align-items: center;
      text-align: right;
    }
 }
  .courseware-search {
    background-color: #fff;
    padding: 0 20px;

    .svg-container {
      padding: 0 5px 0 10px;
      color: $dark_gray;
      vertical-align: middle;
      display: inline-block;

      &_login {
        font-size: 20px;
      }
    }

    .search-input {
      width: 60%;
      position: relative;

      &:after {
        content: "";
        position: absolute;
        left: -25px;
        right: 0;
        bottom: 8px;
        height: 1px;
        background: rgba(226, 227, 232, 1);
      }

      input {
        outline: none;
        background: transparent;
        border: none;
        outline: medium;
        padding: 0;

        &:focus {
          outline: none;
          background-color: transparent;
        }
      }
    }

    .courseware-search-btn {
      display: inline-block;
      float: right;

      .el-button.is-round {
        padding: 10px 30px;
        margin-right: 34px;
      }

      .courseware-search-more {
        font-size: 14px;
        font-weight: 500;
        @include font-color($mainColor);
        cursor: pointer;
      }
    }

    &.merge {
      height: 50px;
      line-height: 50px;
    }

    &.separate {
      .courseware-search-inner {
        padding-top: 10px;

        .search-inner-item {
          .item-label {
            height: 30px;
            line-height: 30px;
            font-size: 14px;
            color: #a6a6a6;
            font-weight: 400;
          }

          .el-input {
            position: relative;

            .el-input__inner {
              border: none;
              padding: 0;
            }

            &:after {
              content: "";
              height: 1px;
              background-color: #e2e3e8;
              position: absolute;
              left: 0;
              right: 0;
              bottom: 0;
            }
          }
        }
      }

      .courseware-search-btn {
        text-align: center;
        display: block;
        float: none;
        height: 56px;
        line-height: 56px;
      }
    }
  }

  .classify-tab {
    width: 100%;
    margin: 10px 0;
    padding: 0 10px;
    background-color: #fff;
    display: flex;
    border-radius: 4px;

    .el-tabs__nav-wrap::after {
      display: none;
    }

    .el-tabs__header {
      margin: 0;
    }
  }

  .courseware-btn {
    display: flex;
    height: 46px;
    line-height: 46px;
    width: 100%;

    .btn-title {
      flex: 1;
      font-size: 16px;
      font-weight: bold;
      color: rgba(51, 51, 51, 1);
    }
  }

  .courseware-list {
    background-color: white;
    margin-top: 10px;
    padding: 10px;
    .el-image {
      width: 100%;
      height: auto;
      max-height: 140px;
      .image-slot {
        width: 100%;
        height: 67px;
        background-color: #f8f8f8;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
    .el-form-item {
      margin-bottom: 5px;
    }

    .el-dropdown-link {
      cursor: pointer;
      @include font-color($mainColor);
    }
  }

  .pagination-container {
    background: none;
  }
  .el-row.see-dialog{
    height: 500px;
    overflow-y: auto;
    padding: 5px 40px;
    .box{
      display: flex;
      width: 100%;
      min-height: 38px;
      .key{
        width: 70px;
        &.max{
          width: 100px;
        }
        &.min{
          width: 50px;
        }
      }
      .value{
        flex: 1;
        color: #333;
        font-weight: 500;
        padding-right:30px ;

        &.textarea-view {
          white-space: pre-line;
          border: 1px solid #e5e5e5;
          border-radius: 6px;
          padding: 10px;
          color: #333;
          background-color: #f9f9f9;
          font-weight: normal;
        }
      }
    }
    .el-col{
      padding-top: 10px;
      margin-top: 15px;
    }
  }
  .cell{
    .el-image{
      width: 100%;
    }
  }
}

</style>
